/************************************************************************/
/* Core                                                                 */
/************************************************************************/
#include "Core/Color.h"

namespace TD_Core {
	
	/************************************************************************/
	/* Static definitions                                                   */
	/************************************************************************/
	const Color Color::RED(0xFF, 0, 0);
	const Color Color::GREEN(0, 0xFF, 0);
	const Color Color::BLUE(0, 0, 0xFF);
	const Color Color::PINK(0xFF, 0, 0xFF);
	const Color Color::YELLOW(0xFF, 0xFF, 0);
	const Color Color::CYAN(0, 0xFF, 0xFF);
	const Color Color::BLACK(0, 0, 0);
	const Color Color::WHITE(0xFF, 0xFF, 0xFF);
	
	/************************************************************************/
	/* ctors and dtors                                                      */
	/************************************************************************/
	Color::Color() {
		m_red = m_green = m_blue = 0x00;
	}
	Color::Color(const Color &rhs) {
		m_red = rhs.m_red;
		m_green = rhs.m_green;
		m_blue = rhs.m_blue;
		m_alpha = rhs.m_alpha;
	}
	Color::Color(SDL_Color &rhs) {
		m_red = rhs.r;
		m_green = rhs.g;
		m_blue = rhs.b;
		m_alpha = rhs.unused;
	}

	Color & Color::operator=(const Color &rhs) {
		m_red = rhs.m_red;
		m_green = rhs.m_green;
		m_blue = rhs.m_blue;
		m_alpha = rhs.m_alpha;
		return(*this);
	} 

	Color & Color::operator=(const SDL_Color &rhs) {
		m_red = rhs.r;
		m_green = rhs.g;
		m_blue = rhs.b;
		m_alpha = rhs.unused;
		return(*this);
	}

	Color::Color(unsigned char r, unsigned char g, unsigned char b, unsigned char a) {
		m_red = r;
		m_green = g;
		m_blue = b;
		m_alpha = a;
	}

	Color::~Color() {
		//Nothing to do
	}

}